/*******************************************************************
 * Copyright (c) 2013 珠海比特讯科技有限公司. All rights reserved.
 * （1）软件的版权将受到法律保护，不允许非经授权的使用；
 * （2）未经版权所有人授权，任何人不得修改、复制和传播软件源代码、图片及其它资源等；
 * （3）未经版权所有人授权，不允许对软件进行修改；
 * （4）未经版权所有人授权，不允许在该软件的基础上开发新的软件；
 * （5）珠海比特讯科技有限公司拥有最终解释权
 *******************************************************************/
package youxiao.bytezon.models;

import java.math.BigDecimal;
import java.time.LocalDate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "teacher_salary")
public class TeacherSalary {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "school_id")
	private School school;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "teacher_id")
	private Teacher teacher;

	@Column(nullable = false)
	private Integer year;

	@Column(nullable = false)
	private Integer month;
	
	@Column(nullable = false)
	private LocalDate beginDate;
	
	@Column(nullable = false)
	private LocalDate endDate;

	@Column(nullable = false)
	private BigDecimal premiumAmount;

	@Column(nullable = false)
	private BigDecimal baseSalary;

	@Column(nullable = false)
	private BigDecimal attendPenalty;

	@Column(nullable = false)
	private BigDecimal personalNssf;

	@Column(nullable = false)
	private BigDecimal personalCpf;

	@Column(nullable = false)
	private BigDecimal subsidy;

	@Column(nullable = false)
	private BigDecimal attendPenaltyAmount;

	@Column(nullable = false)
	private BigDecimal personalTax;

	@Column(nullable = false, name = "field1_amount")
	private BigDecimal field1Amount;

	@Column(nullable = false, name = "field2_amount")
	private BigDecimal field2Amount;

	@Column(nullable = false, name = "field3_amount")
	private BigDecimal field3Amount;

	@Column(nullable = false)
	private BigDecimal beforeTaxAmount;

	@Column(nullable = false)
	private BigDecimal afterTaxAmount;

	@Column
	private String remark;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public School getSchool() {
		return school;
	}

	public void setSchool(School school) {
		this.school = school;
	}

	public Teacher getTeacher() {
		return teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public LocalDate getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(LocalDate beginDate) {
		this.beginDate = beginDate;
	}

	public LocalDate getEndDate() {
		return endDate;
	}

	public void setEndDate(LocalDate endDate) {
		this.endDate = endDate;
	}

	public BigDecimal getPremiumAmount() {
		return premiumAmount;
	}

	public void setPremiumAmount(BigDecimal premiumAmount) {
		this.premiumAmount = premiumAmount;
	}

	public BigDecimal getBaseSalary() {
		return baseSalary;
	}

	public void setBaseSalary(BigDecimal baseSalary) {
		this.baseSalary = baseSalary;
	}

	public BigDecimal getAttendPenalty() {
		return attendPenalty;
	}

	public void setAttendPenalty(BigDecimal attendPenalty) {
		this.attendPenalty = attendPenalty;
	}

	public BigDecimal getPersonalNssf() {
		return personalNssf;
	}

	public void setPersonalNssf(BigDecimal personalNssf) {
		this.personalNssf = personalNssf;
	}

	public BigDecimal getPersonalCpf() {
		return personalCpf;
	}

	public void setPersonalCpf(BigDecimal personalCpf) {
		this.personalCpf = personalCpf;
	}

	public BigDecimal getSubsidy() {
		return subsidy;
	}

	public void setSubsidy(BigDecimal subsidy) {
		this.subsidy = subsidy;
	}

	public BigDecimal getAttendPenaltyAmount() {
		return attendPenaltyAmount;
	}

	public void setAttendPenaltyAmount(BigDecimal attendPenaltyAmount) {
		this.attendPenaltyAmount = attendPenaltyAmount;
	}

	public BigDecimal getPersonalTax() {
		return personalTax;
	}

	public void setPersonalTax(BigDecimal personalTax) {
		this.personalTax = personalTax;
	}

	public BigDecimal getField1Amount() {
		return field1Amount;
	}

	public void setField1Amount(BigDecimal field1Amount) {
		this.field1Amount = field1Amount;
	}

	public BigDecimal getField2Amount() {
		return field2Amount;
	}

	public void setField2Amount(BigDecimal field2Amount) {
		this.field2Amount = field2Amount;
	}

	public BigDecimal getField3Amount() {
		return field3Amount;
	}

	public void setField3Amount(BigDecimal field3Amount) {
		this.field3Amount = field3Amount;
	}

	public BigDecimal getBeforeTaxAmount() {
		return beforeTaxAmount;
	}

	public void setBeforeTaxAmount(BigDecimal beforeTaxAmount) {
		this.beforeTaxAmount = beforeTaxAmount;
	}

	public BigDecimal getAfterTaxAmount() {
		return afterTaxAmount;
	}

	public void setAfterTaxAmount(BigDecimal afterTaxAmount) {
		this.afterTaxAmount = afterTaxAmount;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}
